/*
 * Project CHEN Rendering Engine : /flags.hpp
 * Created: 2020-12-16, Last modified:  2021-03-02
 * 
 * This file contains all the most global constants
 * 
 * Copyright (C) 2021 Hineven (hineven@pku.edu.cn)
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _H_FLAGS
#define _H_FLAGS
namespace chen {
inline bool hasFlag (int mask, int flag) {
    return mask&flag;
}
// light
constexpr unsigned FLIGHT_AREA = 1;
constexpr unsigned FLIGHT_SAMPLE_LO = 2;
constexpr unsigned FLIGHT_LI = 4;
constexpr unsigned FLIGHT_SAMPLE_LI = 8;
// bsdf
constexpr unsigned FBSDF_DELTA = 1;
constexpr unsigned FBSDF_REFLECTION = 2;
constexpr unsigned FBSDF_TRANSMISSION = 4;
// If the bsdf follows eta calculated reflection & transmission
constexpr unsigned FBSDF_SPECULAR = 8; 

// shape
constexpr unsigned FSHAPE_AREALIGHT = 2; 
constexpr unsigned FSHAPE_SUPUSP = 1; // 支持uniformSample方法
constexpr unsigned FSHAPE_SUPUSPFR = 4; // 支持uniformSampleFrom方法
constexpr unsigned FSHAPE_DBG = 8; // debug flag

}
#endif